package com.yc.creationType.singleton;

// 静态内部类实现单例
public class Singleton {

    private static class SingletonInstance {
        private static final Singleton INSTANCE = new Singleton();
    }

    // 私有化构造器
    private Singleton() {

    }

    public static Singleton getInstance() {
        return SingletonInstance.INSTANCE;
    }
}
